function nTabs(thisObj,Num){
	
if(thisObj.className =="selected")return;
var tabObj = thisObj.parentNode.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0; i <tabList.length; i++){
		if (i == Num){
			thisObj.className = "selected";
			document.getElementById(tabObj+"_content"+i).style.display = "block";
		}else {
			tabList[i].className = "noselected";
			document.getElementById(tabObj+"_content"+i).style.display = "none";
		}
	}
}
function $(id){
return document.getElementById(id);
}
function changeUserType(id){
if($(id).value!=0)
location.href="/sysmember/shenheList.jhtml?type="+$(id).value;
}
function setVip(type){
var objs=document.getElementsByName("checkbox");
var count=objs.length;
var c=0;
if(count==0) {alert("没有可操作的选项！");return false;}
for(var i=0;i<objs.length;i++)
if(objs[i].checked==true)  c++;
if(c==0) {alert("请选择要操作的选项！");return false;}
if(c>1) {alert("对不起，一次只能对一条数据操作！");return false;}
if(confirm("确定将这个会员升级成VIP?"))
location.href="/sysmember/changeUserTypeInList.jhtml?member.id="+objs[0].value+"&member.type="+type;
else return false;

}
function del(name,id){
if(confirm("确定要删除"+name+"这个用户吗？")) {
var url = "/sysmember/removeMember.jhtml?id="+id+"&temp="+new Date().getMilliseconds();		
		new Ajax.Request(url,{method: 'get', onComplete: function(e){
			var tt = e.responseText;	
			if(tt == "true"){
				$("user"+id).style.display="none";
				alert("操作成功！谢谢使用");
			}else{
				alert("删除失败，出错！");
				}
		}});
		}
}
function go(type){
if (type == 3)
			url= "/sysmember/listMember.jhtml?type=3";
		else if (type == 2)
			url= "/sysmember/listMember.jhtml?type=2";
		else
			url= "/sysmember/listMember.jhtml?type=1";
location.href=url;
}
function vipUp(name,id,type){
if(confirm("确定要将"+name+"这个用户升级成VIP吗？")) {
var url = "/sysmember/changeTypeByAjax.jhtml?member.id="+id+"&member.type="+type+"&temp="+new Date().getMilliseconds();		
		new Ajax.Request(url,{method: 'get', onComplete: function(e){
			var tt = e.responseText;	
			if(tt == "true"){
				$("user"+id).style.display="none";
				alert("操作成功！谢谢使用");
				
			}else{
				alert("删除失败，出错！");
				}
		}});
		}
}
//通过厂家申请
function changPass(name,id,type){
if(confirm("确定让"+name+"用户成为厂家会员？")) {
var url = "/sysmember/changeTypeByAjax.jhtml?member.id="+id+"&member.type="+type+"&temp="+new Date().getMilliseconds();		
		new Ajax.Request(url,{method: 'get', onComplete: function(e){
			var tt = e.responseText;	
			if(tt == "true"){
				$("user"+id).style.display="none";
				alert("操作成功！谢谢使用");
				
			}else{
				alert("删除失败，出错！");
				}
		}});
		}
}
alert(1)